import java.util.Scanner;

public class Teacher extends Person
{
    public Teacher()
    {

    }
    private String EmployeeID;//工号
    private double BasicWages;//基本工资
    private int StartingSalaryYear;//起薪年份
    private double WageGrowthRate;//工资增长率
    public Teacher(String EmployeeID,double BasicWages,int StartingSalaryYear,double WageGrowthRate)
    {
        this.EmployeeID=EmployeeID;
        this.BasicWages=BasicWages;
        this.StartingSalaryYear=StartingSalaryYear;
        this.WageGrowthRate=WageGrowthRate;
    }
    public double TYBasicWages()//计算今年基本工资方法
    {
        System.out.println("请输入起薪年份");
        Scanner startingSalaryYear=new Scanner(System.in);
        int n=startingSalaryYear.nextInt();//输入起薪年份
        System.out.println("请输入今年年份");
        Scanner ThisYear=new Scanner(System.in);
        int m=ThisYear.nextInt();//输入今年年份
        System.out.println("请输入工资增长率");
        Scanner wageGrowthRate=new Scanner(System.in);
        double o=ThisYear.nextDouble();//输入工资增长率
        if(m<n)
        {
            System.out.println("输入错误，请重新输入");
            System.exit(-1);//终止程序
        }
        else
        {
            BasicWages=(m-n)*o*2000+2000;//定义起薪为2000
        }
        return BasicWages;
    }
    public void ShowInfo(String EmployeeID)//打印工资信息
    {
        this.EmployeeID=EmployeeID;
        this.BasicWages=BasicWages;
        System.out.println("工号："+EmployeeID);
        System.out.println("基本工资："+BasicWages);
    }
}
